<?php
    $title = 'บริษัท แบคอัพ คอมมิวนิเคชั่นส์ แอนด์ เซอร์วิสเซส จำกัด';
    include('header.php');
    
    $sql = "SELECT * FROM business_applications WHERE ba_active=1 ORDER BY ba_position";
    $result = $db->Execute($sql);
    $i = 1;
    $img_list = '';
    while (!$result->EOF)
    {
        if(img_exists(APPPATH.'/images/business',$result->fields['ba_path'])){
            $img_list .= '<img src="'.SITEURL.'/images/business/'.$result->fields['ba_path'].'" />';
        }
        $result->MoveNext();
    }
    $result->Close();
?>
	    <div id="business_left">
		<h2 id="business_title"><?php echo _l('business applications'); ?></h2>
		<h3>Software Developments</h3>
		<p>
		    <?php echo _l('software-development-detail'); ?>
		</p>
		<h3>Mobile Application</h3>
		<p>
		    <?php echo _l('mobile-application-detail'); ?>
		</p>
		
		<!--<img class="first" src="images/business/1.jpg">-->
		<!--<img src="images/business/1.jpg">-->
		<!--<div class="clear">&nbsp;</div>-->
	    </div>
	    
	    <div id="business_right">
		
		<div id="business_right_slide">
		    <?php echo $img_list; ?>
		</div>
		
	    </div>
	    
	    <div class="clear">&nbsp;</div>
<?php
    include('footer.php');
?>
<script type="text/javascript" src="js/jquery.cycle.all.js"></script>
<script>
    $(document).ready(function(){
	$('#business_right_slide').cycle();
    });
</script>